layui.use(['layer', 'form', 'admin', 'ax','upload','laydate'], function () {
    var $ = layui.jquery;
    var $ax = layui.ax;
    var form = layui.form;
    var admin = layui.admin;
    var layer = layui.layer;
    var upload=layui.upload;
    var laydate=layui.laydate;

    //渲染时间选择框
    laydate.render({
        elem: '#xdrq'
    });
    upload.render({
        elem: '#uploadExcel'
        , url: '/btyMtyq/import'
        , accept:"file"
        , size:'204800'
       // , exts: 'xls|xlsx|xlsm|xlt|xltx|xltm|txt'
        , done: function (res) {
            if(res.state==0){
                alert(res.errmsg);
            }
            if(res==true){
                //parent.layer.msg('导入成功！', {icon: 1,time:2000,shade:0.2});
                Feng.success("导入成功！");
                //传给上个页面，刷新table用
                admin.putTempData('formOk', true);
                //关掉对话框
                admin.closeThisDialog();
            }
        }
    });


});